/*
 * Extra-Functions.cpp

 *
 *  Created on: 25/11/2013
 *      Author: ubuntu
 */
#include "Extra-Functions.h"
#include <string>
using namespace std;


bool isStopWord(string a[], int high, string target) {
    int low = 0;

	bool friends;
    while (!friends && low <= high)
    {
        int middle = (low + high) / 2;
        if (a[middle] == target)
        {
            friends = true;
        }
        else if (a[middle] > target)
            high = middle - 1;
        else high = middle + 1;
    }


    return friends;
}

